//This class is the base class from which the other
//  classes and forms are called and displayed.

#include "basewindow.h"
#include "ui_basewindow.h"

BaseWindow::BaseWindow(QWidget *parent, QString filepathString) :
    QMainWindow(parent),
    filepath(filepathString),
    ui(new Ui::BaseWindow)
{
    ui->setupUi(this);
}

BaseWindow::~BaseWindow()
{
    delete ui;
}

//Basic method for running the game.
void BaseWindow::runGame()
{
    showMainMenu();
}

//Display the main menu.
int BaseWindow::showMainMenu()
{
    MainMenu *menu = new MainMenu(this, filepath);
    menu->show();
}

//Display the main gameplay area (start the game).
int BaseWindow::showMainWindow(QString command)
{
    MainWindow *game = new MainWindow(this, filepath, command);
    game->show();
}
